global using System;
global using XYS.Core.Util;
global using XYS.Service.Core;
using XYS.Service.Core.Util.Helper;

//日志工厂 
var loggerFactory = LoggerFactoryHelper.CreateLoggerFactory();

//添加基础核心功能
var builder = WebApplication.CreateBuilder(args).AddCore(loggerFactory);

var app = builder.Build();

//增加异常处理管道
app.UseMiddleware<XYS.Test.API.Middlewares.ExceptionHandlerMiddleware>();
//启用基础核心功能
app.UseCore();

app.Run();
